<?php
/**
 * 日志追踪类
 * @author fuyou
 * @since May 14, 2015 9:36:08 AM
 * @version 2.0
 * @copyright    (c) 2015 , DANG
 *
 */
class LibSOATrace {
    /**
     * 日志打印方法
     *
     * @param unknown $message            
     */
    public static function soaDebug($message,$category='default') {
        if (is_string ( $message )) {
            front_log_output ( $category, ConstLog::$LOG_LEVEL_DEBUG, $message );
        } else {
            front_log_output ( $category, ConstLog::$LOG_LEVEL_DEBUG, var_export ( $message, true ) );
        }
    }
    /**
     *
     * @param unknown $message            
     * @param string $category            
     * @since May 14, 2015 9:35:10 AM
     * @access
     *
     */
    public static function soaInfo($message,$category='default') {
        if (is_string ( $message )) {
            front_log_output ( $category, ConstLog::$LOG_LEVEL_INFO, $message );
        } else {
            front_log_output ( $category, ConstLog::$LOG_LEVEL_INFO, var_export ( $message, true ) );
        }
    }
    /**
     *
     * @param unknown $message            
     * @param string $category            
     * @since May 14, 2015 9:35:15 AM
     * @access
     *
     */
    public static function soaNotice($message,$category='default') {
        if (is_string ( $message )) {
            front_log_output ( $category, ConstLog::$LOG_LEVEL_NOTICE, $message );
        } else {
            front_log_output ( $category, ConstLog::$LOG_LEVEL_NOTICE, var_export ( $message, true ) );
        }
    }
    /**
     *
     * @param unknown $message            
     * @param string $category            
     * @since May 14, 2015 9:35:19 AM
     * @access
     *
     */
    public static function soaWarn($message,$category='default') {
        if (is_string ( $message )) {
            front_log_output ( $category, ConstLog::$LOG_LEVEL_WARN, $message );
        } else {
            front_log_output ( $category, ConstLog::$LOG_LEVEL_WARN, var_export ( $message, true ) );
        }
    }
    /**
     *
     * @param unknown $message            
     * @param string $category            
     * @since May 14, 2015 9:35:25 AM
     * @access
     *
     */
    public static function soaError($message,$category='default') {
        if (is_string ( $message )) {
            front_log_output ( $category, ConstLog::$LOG_LEVEL_ERROR, $message );
        } else {
            front_log_output ( $category, ConstLog::$LOG_LEVEL_ERROR, var_export ( $message, true ) );
        }
    }
    /**
     *
     * @param unknown $message            
     * @param string $category            
     * @since May 14, 2015 9:35:28 AM
     * @access
     *
     */
    public static function soaFatal($message,$category='default') {
        if (is_string ( $message )) {
            front_log_output ( $category, ConstLog::$LOG_LEVEL_FATAL, $message );
        } else {
            front_log_output ( $category, ConstLog::$LOG_LEVEL_FATAL, var_export ( $message, true ) );
        }
    }
}